home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1993 November
/
JCSM Shareware Collection - 1993-11.iso
/
cl720
/
qbnws31j.lzh
/
MEMCOPY.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-11-07
|
770b
|
39 lines
PAGE 56,132
TITLE MemCopy.ASM - QBasic callable memory block copy bin file
;
; MemCopy.ASM - (C)1991 by Brent Ashley
; Copies blocks of memory quickly - to be used for screen saves.
;
; written with Microsoft QC/QuickAssembler v2.51
.MODEL medium, BASIC
.CODE
MemCopy PROC USES si di ds es, FromSeg:PTR WORD, FromOfs:PTR WORD, \
ToSeg:PTR WORD, ToOfs:PTR WORD, \
Count:PTR WORD
; load ds:si with source, es:di with destination
mov bx,FromOfs
mov si,[bx]
mov bx,ToSeg
mov es,[bx]
mov bx,ToOfs
mov di,[bx]
mov bx,Count
mov cx,[bx]
; ds last (used to access data)
mov bx,FromSeg
mov ds,[bx]
; do the copy
cld
rep movsb
ret
MemCopy ENDP
END